
import axios from 'axios'

const btn = document.querySelector('#btn')

btn.addEventListener('click', function() {
  // 发请求拿数据
  axios.get('http://123.57.109.30:3006/api/getbooks').then(res => {
    console.log(res)
  })
})

import './css/index.css'

// 引入 less 文件
import './less/index.less'

import imgObj from './assets/images/1.gif'
// 1. 创建一个 img 标签
const img = document.createElement('img')
// 2. 设置 src 为本地的大图片
img.src = imgObj
// 3. 将 img 标签插入到 body
document.body.appendChild(img)

import './assets/fonts/iconfont.css'
const i = document.createElement('i')
i.className = 'iconfont icon-qq'
document.body.appendChild(i)

const obj = {
  name: 'zs',
  dog: {
    name: '大黄',
    age: 5
  }
}

const fn = () => {
  console.log('我是 fn')
}

console.log(fn)